home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 December / CHIPNET Aralık 1997.iso / linux / redhat / misc / src / install / hash.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-11  |  603 b   |  26 lines

  1. #ifndef H_HASH
  2. #define H_HASH
  3.  
  4. struct hash_table;
  5. typedef struct hash_table * hashTable;
  6.  
  7. struct ht_iterator {
  8.     int bucket;
  9.     int item;
  10. };
  11.  
  12. typedef struct ht_iterator htIterator;
  13.  
  14. struct hash_table *htNewTable(int size);
  15. void htFreeHashTable(struct hash_table *ht);
  16. char *htInTable(struct hash_table *t, char *s);
  17. void htAddToTable(struct hash_table *t, char *s);
  18. void htPrintHashStats(struct hash_table *t);
  19. int htNumEntries(struct hash_table *t);
  20.  
  21. /* these use static storage */
  22. void htIterStart(htIterator * iter);
  23. int htIterGetNext(struct hash_table * t, htIterator * iter, char ** s);
  24.  
  25. #endif
  26.